package itsm.isperp.module.dto.bpm;

import itsm.isperp.module.entity.bpm.BpmNodeSetting;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;

/**
 * 
 * 节点设置
 * 
 * @author lizx
 * @date 2013-7-3
 * 
 */
public class BpmNodeSettingDTO extends BpmNodeSetting {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	String[] messageTypes;

	protected BpmNodeSettingDTO() {

	}

	public BpmNodeSettingDTO(BpmNodeSetting model) {
		// 将父类的属性转换为子类
		BeanUtils.copyProperties(model, this);
		if (StringUtils.isNotEmpty(model.getMessageType())) {
			this.messageTypes = model.getMessageType().split(",");
		} else {
			this.messageTypes = new String[0];
		}
	}

	public String[] getMessageTypes() {
		return messageTypes;
	}

	public void setMessageTypes(String[] messageTypes) {
		this.messageTypes = messageTypes;
	}

}
